package org.oschina.api.user.follow.plugin;

import org.oschina.api.user.follow.dao.UserFollowDAO;
import org.oschina.api.user.user.model.User;
import org.oschina.plugin.AbstractPlugin;
import org.springframework.beans.factory.annotation.Autowired;

public class UserLogoutFollowDataHandlePlugin extends AbstractPlugin {

	@Autowired
	private UserFollowDAO userFollowDAO;
	
	@Override
	public String getExplain()
	{
		return "用户退出关注数据处理插件";
	}
	
	@Override
	public void logout(User user)
	{
		userFollowDAO.removeCache(user.getId());
	}

}